package com.example.demoweb.service;

import java.util.List;
import org.springframework.web.multipart.MultipartFile;

import com.example.demoweb.entity.Attachment;
import com.example.demoweb.framework.ExecuteResult;
import com.example.demoweb.framework.mybatis.common.IBaseService;
/**
 * 对Attachment实体进行CRUD操作
 * 表：attachment
 */
public interface IAttachmentService extends IBaseService<Attachment>{
	
	/**
	 * 单文件上传
	 * @return
	 */
	public ExecuteResult<String> saveOne(MultipartFile file,String relaId);
	//----------增加	
	/**
	 *  attachment
	 * 添加
	 */
	public void save(Attachment attachment);	
	//-------根据主键删除
	/**
	 *  attachment
	 * 删除
	 */
	public void deleteById(String id);
	//-------根据主键删除
	/**
	 *  attachment
	 * 删除
	 */
	public void deleteByModel(Attachment attachment);
	//---------------全字段修改
	/**
	 *  attachment
	 * 修改
	 */
	public void update(Attachment attachment);
	//---------------查找
	/**
	 *  
	 * @return 查找
	 */
	public Attachment getById(String id);
	/**
	 *  
	 * @return 全部字段查找
	 */
	public Attachment getByModel(Attachment attachment);
	//-------------查找list
	/**
	 *  model
	 */
	public List<Attachment> searchList(Attachment attachment);
	/**
	 * 根据relaId查询
	 * @param relaId 
	 * @return
	 */
	public Attachment getAttByRelaId(String relaId);
	/**
	 * 根据relaId查询文件信息,列表
	 * @param relaId
	 * @return
	 */
	public List<Attachment> searchAttListByRelaId(String relaId);
	
}
